<?php

class Service_friends extends MY_Service
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model('Model_friend');
    }

    public function getList()
    {
        $friends = $this->cache->memcached->get('friend');
        if (empty($friends)) {
            $cond = ['status' => 0];
            $friends = $this->Model_friend->getList(false, $cond);
            $this->cache->memcached->save('friend', $friends, 86400);
        }
        return $friends;
    }
}